package action

import (
	"chat-room/client/global"
	"chat-room/common"
	"encoding/json"
)

type Message struct {

}

func (that *Message) MassMessage(strMsg string) (err error) {
	MessageEx := common.Message{
		Type: common.MassMessageRequestMsgType,
		Data: strMsg,
	}

	MessageExByte, _ := json.Marshal(MessageEx)

	FunctionsEx := &common.Functions{}
	err =FunctionsEx.SendMsg(global.Conn,MessageExByte)
	return
}